/**
 * 神州信息(2012)
 */
package net.abbp.report.designer.form.toolbar;

import java.awt.FlowLayout;

import javax.swing.JToolBar;

import net.abbp.report.designer.action.IAction;
import net.abbp.report.designer.form.EFormDesigner;
import net.abbp.report.designer.form.action.SaveAction;

/**
 * 表单设计器工具栏
 * 
 * @version 1.0
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ABBP 1.0
 * 
 *        <pre>
 * 历史：
 *      建立: Aug 2, 2012 lexloo
 * </pre>
 */
public class FormDesignToolbar extends JToolBar {
    public FormDesignToolbar() {
        super();

        this.initialize();
    }

    /**
     * 初始化
     */
    private void initialize() {
        this.setRollover(true);
        this.setLayout(new FlowLayout(FlowLayout.LEFT, 1, 1));
        this.addAction(new SaveAction());
    }

    /**
     * 添加Action
     * 
     * @param action
     */
    private void addAction(IAction action) {
        this.add(action.createToolBarComponent());
    }
}
